<template>
  <div class="main-home">
    <div class="page-home">
    <div class="page-home-header">
      <div class="header-bell">
        <router-link to="/message"
          ><van-badge dot>
            <van-icon name="bell" /> </van-badge
        ></router-link>
      </div>
      <div class="header-search">
        <span>程序猿</span>
        <van-search
          v-model="value"
          shape="round"
          placeholder="请输入搜索关键词"
        />
      </div>
      <div>
        <van-tabs v-model:active="active" route>
          <van-tab title="推荐" replace to="/home/commend"></van-tab>
          <van-tab title="Java"></van-tab>
          <van-tab title="大数据"></van-tab>
          <van-tab title="前端"></van-tab>
          <van-tab title="人工智能"></van-tab>
        </van-tabs>
      </div>
    </div>
    <div class="page-home-body">
      <router-view></router-view>
    </div>
  </div>
  </div>
</template>
<script>
export default { name: "home" };
</script>
<script setup>
import {ref} from 'vue';
 const value = ref('');
 const active = ref(0)
</script>
<style lang="scss" scoped>
.main-home{
  height: 100%;
  overflow: auto;
}
.page-home {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  &-header {
    height: 200px;
    width: 100%;
    border: 1px solid orange;
    background-color: orange;
    .header-bell {
      position: absolute;
      top: 10px;
      right: 20px;
      font-size: 20px;

      .van-icon {
        color: #fff;
      }
    }
    .header-search {
      margin: 40px;
      font-size: 20px;
      font-weight: bold;
      color: #fff;
      .van-search {
        margin: 10px;
        padding: 0;
        background: none;
      }
    }
  }
  .van-tabs__nav {
    background: orange;
  }
  &-body {
    flex: 1;
    width: 100%;
    height: 100%;
  }
}
</style>
